﻿-- =============================================
-- Author:		Alejandro González
-- Create date: 2/28/2011
-- Description:	Inserts BankAccount in table BankAccounts (due to Linq limitations)
-- =============================================
CREATE PROCEDURE [dbo].[InsertBankAccount]
	-- Add the parameters for the stored procedure here
	@bankId tinyint,
	@description varchar(50),	
	@currencyId tinyint
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	INSERT INTO [BankAccounts]
           (BankId,[Description],CurrencyId)
     VALUES
           (@bankId,@description,@currencyId)
	SELECT Cast(@@IDENTITY AS smallint) AS Id
END
